package com.meituan.dao;

import com.meituan.pojo.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface RoleRepository extends JpaRepository<Role,Integer> {

    @Query(value = "select rid from user_role where uid=?1",nativeQuery = true)
    List<Integer> findRidByUid(Integer id);
}
